﻿using Looptribe.Moodlin8.Model;

namespace Looptribe.Moodlin8.ViewModel
{
    public class UserMessageWrapper : Wrapper<InstantMessage>
    {
        public string Subject
        {
            get { return WrappedObject.Subject; }
        }

        public string Body
        {
            get { return WrappedObject.FullMessage; }
        }

        private readonly UserWrapper _sender;
        public UserWrapper Sender { get { return _sender; } }

        private readonly bool _isOwn;
        public bool IsOwn { get { return _isOwn; } }

        public UserMessageWrapper(InstantMessage wrappedObject, User sender, bool isOwn) : base(wrappedObject)
        {
            _sender = new UserWrapper(sender);
            _isOwn = isOwn;
        }
    }
}
